Azure AI Face API (stable:v1.2)

2025/07/25 • 2 updated methods

LivenessSessionOperations_CreateLivenessSession (updated)
Description A session is best for client device scenarios where developers want to authorize a client device to perform only a liveness detection without granting full access to their resource. Created sessions have a limited life span and only authorize clients to perform the desired action before access is expired. Permissions includes... > * * A token lifetime of 10 minutes. > [!NOTE] > Client access can be revoked by deleting the session using the Delete Liveness Session operation. To retrieve a result, use the Get Liveness Session. To audit the individual requests that a client has made to your resource, use the List Liveness Session Audit Entries.
Reference Link ¶

⚶ Changes

{
  "#id": "LivenessSessionOperations_CreateLivenessSession",
  "Description": {
    "new": "A session is best for client device scenarios where developers want to authorize a client device to perform only a liveness detection without granting full access to their resource. Created sessions have a limited life span and only authorize clients to perform the desired action before access is expired.\n\nPermissions includes...\n>\n*\n  * A token lifetime of 10 minutes.\n\n> [!NOTE]\n> Client access can be revoked by deleting the session using the Delete Liveness Session operation. To retrieve a result, use the Get Liveness Session. To audit the individual requests that a client has made to your resource, use the List Liveness Session Audit Entries.",
    "old": "A session is best for client device scenarios where developers want to authorize a client device to perform only a liveness detection without granting full access to their resource. Created sessions have a limited life span and only authorize clients to perform the desired action before access is expired.\n\nPermissions includes...\n>\n*\n  * Ability to call /detectLiveness/singleModal for up to 3 retries.\n  * A token lifetime of 10 minutes.\n\n> [!NOTE]\n> Client access can be revoked by deleting the session using the Delete Liveness Session operation. To retrieve a result, use the Get Liveness Session. To audit the individual requests that a client has made to your resource, use the List Liveness Session Audit Entries."
  }
}

⚼ Request

POST:  /detectLiveness-sessions
{
body:
{
livenessOperationMode: enum ,
deviceCorrelationIdSetInClient: boolean ,
enableSessionImage: boolean ,
livenessModelVersion: enum ,
deviceCorrelationId: string ,
authTokenTimeToLiveInSeconds: integer ,
}
,
}

⚐ Response (200)

{
sessionId: string ,
authToken: string ,
status: enum ,
modelVersion: enum ,
results:
{
attempts:
[
{
attemptId: integer ,
attemptStatus: enum ,
result:
{
livenessDecision: enum ,
targets:
{
color:
{
faceRectangle:
{
top: integer ,
left: integer ,
width: integer ,
height: integer ,
}
,
}
,
}
,
digest: string ,
sessionImageId: string ,
}
,
error:
{
code: string ,
message: string ,
targets:
{
color:
{
faceRectangle:
{
top: integer ,
left: integer ,
width: integer ,
height: integer ,
}
,
}
,
}
,
}
,
}
,
]
,
}
,
}

⚐ Response (default)

{
$headers:
{
x-ms-error-code: string ,
}
,
$schema:
{
error:
{
code: string ,
message: string ,
}
,
}
,
}
LivenessSessionOperations_CreateLivenessWithVerifySession (updated)
Description A session is best for client device scenarios where developers want to authorize a client device to perform only a liveness detection without granting full access to their resource. Created sessions have a limited life span and only authorize clients to perform the desired action before access is expired. Permissions includes... > * * A token lifetime of 10 minutes. > [!NOTE] > > * > * Client access can be revoked by deleting the session using the Delete Liveness With Verify Session operation. > * To retrieve a result, use the Get Liveness With Verify Session. > * To audit the individual requests that a client has made to your resource, use the List Liveness With Verify Session Audit Entries.
Reference Link ¶

⚶ Changes

{
  "#id": "LivenessSessionOperations_CreateLivenessWithVerifySession",
  "Description": {
    "new": "A session is best for client device scenarios where developers want to authorize a client device to perform only a liveness detection without granting full access to their resource. Created sessions have a limited life span and only authorize clients to perform the desired action before access is expired.\n\nPermissions includes...\n>\n*\n  * A token lifetime of 10 minutes.\n\n> [!NOTE]\n>\n> *\n>   * Client access can be revoked by deleting the session using the Delete Liveness With Verify Session operation.\n>   * To retrieve a result, use the Get Liveness With Verify Session.\n>   * To audit the individual requests that a client has made to your resource, use the List Liveness With Verify Session Audit Entries.",
    "old": "A session is best for client device scenarios where developers want to authorize a client device to perform only a liveness detection without granting full access to their resource. Created sessions have a limited life span and only authorize clients to perform the desired action before access is expired.\n\nPermissions includes...\n>\n*\n  * Ability to call /detectLivenessWithVerify/singleModal for up to 3 retries.\n  * A token lifetime of 10 minutes.\n\n> [!NOTE]\n>\n> *\n>   * Client access can be revoked by deleting the session using the Delete Liveness With Verify Session operation.\n>   * To retrieve a result, use the Get Liveness With Verify Session.\n>   * To audit the individual requests that a client has made to your resource, use the List Liveness With Verify Session Audit Entries."
  }
}

⚼ Request

POST:  /detectLivenessWithVerify-sessions
{
livenessOperationMode: string ,
deviceCorrelationIdSetInClient: boolean ,
enableSessionImage: boolean ,
livenessModelVersion: string ,
returnVerifyImageHash: boolean ,
verifyConfidenceThreshold: number ,
verifyImage: file ,
deviceCorrelationId: string ,
authTokenTimeToLiveInSeconds: integer ,
}

⚐ Response (200)

{
sessionId: string ,
authToken: string ,
status: enum ,
modelVersion: enum ,
results:
{
verifyReferences:
[
{
referenceType: enum ,
faceRectangle:
{
top: integer ,
left: integer ,
width: integer ,
height: integer ,
}
,
qualityForRecognition: enum ,
}
,
]
,
attempts:
[
{
attemptId: integer ,
attemptStatus: enum ,
result:
{
livenessDecision: enum ,
targets:
{
color:
{
faceRectangle:
{
top: integer ,
left: integer ,
width: integer ,
height: integer ,
}
,
}
,
}
,
digest: string ,
sessionImageId: string ,
verifyResult:
{
matchConfidence: number ,
isIdentical: boolean ,
}
,
verifyImageHash: string ,
}
,
error:
{
code: string ,
message: string ,
targets:
{
color:
{
faceRectangle:
{
top: integer ,
left: integer ,
width: integer ,
height: integer ,
}
,
}
,
}
,
}
,
}
,
]
,
}
,
}

⚐ Response (default)

{
$headers:
{
x-ms-error-code: string ,
}
,
$schema:
{
error:
{
code: string ,
message: string ,
}
,
}
,
}